<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>更新员工</title>
    <link th:href="@{dist/css/bootstrap.css}" rel="stylesheet">
	<link rel="stylesheet" type="text/css" th:href="@{css/emp.css}"/>
  </head>
  <body>
	
	
	<div class="container">
		
		<div class="row">
			<h1 class="text-center">更新员工</h1>
			<div class="col-lg-3">
			</div>
			<div class="col-lg-6">
				<form class="form-horizontal" th:action="@{/upEmp}">
					<input type="hidden" id="empId" name="empId" th:value="${emps.empId}"/>
				  <div class="form-group">
				    <label for="empName" class="col-sm-2 control-label">员工姓名</label>
				    <div class="col-sm-10">
				      <input type="text" class="form-control" id="empName" name="empName" th:value="${emps.empName}" placeholder="员工姓名">
				    </div>
				  </div>
				  <div class="form-group">
				    <label for="email" class="col-sm-2 control-label">邮箱</label>
				    <div class="col-sm-10">
				      <input type="email" class="form-control" id="email" name="email" th:value="${emps.email}" placeholder="邮箱">
				    </div>
				  </div>
				  <div class="form-group">
				    <label for="phone" class="col-sm-2 control-label">手机号</label>
				    <div class="col-sm-10">
				      <input type="text" class="form-control" id="phone" name="phone" th:value="${emps.phone}"  placeholder="手机号">
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <label class="col-sm-2 control-label">部门</label>
				    <div class="col-sm-10">
				      <select class="form-control" name="department.deptId">
				        <option th:selected="${emps.department.deptId eq department.deptId}" th:each="department,deptStat:${departments}" th:text="${department.deptName}" th:value="${department.deptId}">人事部</option>

				      </select>
				    </div>
				  </div>
				  <div class="form-group">
				    <label  class="col-sm-2 control-label">性别</label>
				    <div class="col-sm-10">
				      <label class="radio-inline">
				        <input type="radio" th:checked="${emps.gender eq '男'}" name="gender" id="gender_man" value="男">男
				      </label>
				      <label class="radio-inline">
				        <input type="radio" th:checked="${emps.gender eq '女'}" name="gender" id="gender_woman" value="女">女
				      </label>
				    </div>
				  </div>
				  
				  <div class="form-group">
				    <label for="hireDate" class="col-sm-2 control-label">入职时间</label>
				    <div class="col-sm-10">
				      <input type="text" class="form-control" id="hireDate" name="hireDate" th:value="${#dates.format(emps.hireDate,'yyyy-MM-dd HH:mm:ss')}" placeholder="入职时间">
				    </div>
				  </div>
				  
				  
				  <div class="form-group">
				    <div class="col-sm-offset-2 col-sm-10">
				      <button type="submit" class="btn btn-default">更新员工</button>
				    </div>
				  </div>
				</form>
			</div>
			<div class="col-lg-3">
			</div>
		</div>
		
	</div>

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script th:src="@{js/jquery.js}"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script th:src="@{dist/js/bootstrap.js}"></script>
  </body>
</html>